<?php include 'header.php' ?>
<!--==============================content================================-->
<div class="content page1">
    <div class="container_12">
      <div class="grid_12">
             <h3>Thực đơn hôm qua <?php echo $yesterday; ?></h3>
      </div>
      <?php
        $i = 0;
        $countList = count($menu['yesterday']);
        foreach ($menu['yesterday'] as $id => $foods) 
        {
          // 5 món 1 dòng
          if( $i == 4 )
          {
            echo '<div class="clear"></div>';
            $i = 0;
          }
          
          echo '<div style="height: 388px;" class="grid_3 maxheight"><div class="box_inner">
                         <h4>'.$foods['food']['name'].'</h4>
                         <div class="relative"> <img src="'.base_url('uploads/'.$foods['food']['picture']).'" alt="" class="img_inner"  width="200px" height="200px">
                          <div class="r_price">'.$foods['number'].'&nbsp;<span>K</span></div>
                         </div>
                         '.substr($foods['food']['howtocook'], 0, 155).'...<br>
                         <a href="'.site_url('test/menu/'.$foods['food']['id']).'" class="link1">Xem món ăn</a> </div>
                  </div>';          
          $i++;
        }
      ?>      
    </div>
  <!-- <div class="hor_separator"></div>    --> 
  <div class="container_12">
      <div class="grid_12">
             <h3>Thực đơn hôm nay <?php echo $today; ?></h3>
             &nbsp;
              <a href="<?php echo site_url('test/addFoodToMenu/today'); ?>">[Thêm món ăn hôm nay]</a>
      </div>
      <?php
        $i = 0;
        $countList = count($menu['today']);
        foreach ($menu['today'] as $id => $foods) 
        {
          //5 món 1 dòng          
          if( $i == 4 )
          {
            echo '<div class="clear"></div>';
            $i = 0;
          }          
          echo '<div style="height: 388px;" class="grid_3 maxheight"><div class="box_inner">
                         <h4>'.$foods['food']['name'].'</h4>
                         <div class="relative"> <img src="'.base_url('uploads/'.$foods['food']['picture']).'" alt="" class="img_inner" width="200px" height="200px">
                          <div class="r_price">'.$foods['number'].'&nbsp;<span>K</span></div>
                         </div>
                         '.substr($foods['food']['howtocook'], 0, 255).'...<br>
                         <a href="'.site_url('test/menu/'.$foods['food']['id']).'" class="link1">Xem món ăn</a>&nbsp; 
                         <a href="'.site_url('test/deleteFoodInMenu/'.$id).'" onClick="return deleteFoodInMenu()" class="link1">[Xóa món ăn này]</a> 
                         </div>
                  </div>    
                ';          
          $i++;
        }
      ?>      
    </div>
    <!-- <div class="hor_separator"></div>  -->   
    <div class="container_12">
        <div class="grid_12">
               <h3>Thực đơn ngày mai <?php echo $tomorrow; ?></h3>
               &nbsp;
                <a href="<?php echo site_url('test/addFoodToMenu/tomorrow'); ?>">[Thêm món ăn ngày mai]</a>
        </div>
        <?php
          $i = 0;
          $countList = count($menu['tomorrow']);
          foreach ($menu['tomorrow'] as $id => $foods) 
          {
            //5 món 1 dòng          
            if( $i == 4 )
            {
              echo '<div class="clear"></div>';
              $i = 0;
            }          
            echo '<div style="height: 388px;" class="grid_3 maxheight"><div class="box_inner">
                           <h4>'.$foods['food']['name'].'</h4>
                           <div class="relative"> <img src="'.base_url('uploads/'.$foods['food']['picture']).'" alt="" class="img_inner" width="200px" height="200px">
                            <div class="r_price">'.$foods['number'].'&nbsp;<span>K</span></div>
                           </div>
                           '.substr($foods['food']['howtocook'], 0, 255).'...<br>
                           <a href="'.site_url('test/menu/'.$foods['food']['id']).'" class="link1">Xem món ăn</a>&nbsp; 
                           <a href="'.site_url('test/deleteFoodInMenu/'.$id).'" onClick="return deleteFoodInMenu()" class="link1">[Xóa món ăn này]</a> 
                           </div>                           
                    </div>    
                  ';          
            $i++;
          }
        ?>      
      </div>
  <div class="hor_separator"></div>      
</div>
<?php include 'footer.php' ?>